package com.lidongwei.plus.dubbo.client.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.lidongwei.plus.dubbo.server.service.SayHelloService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloController {
    @Reference
    SayHelloService sayHelloService;

    @GetMapping("/sayHello/{name}")
    public String sayHello(@PathVariable String name){
        return sayHelloService.sayHello(name);
    }
}
